
DIR=`(cd $1; pwd)`
OUTPUT="voroh.out1"
rm $OUTPUT
#echo $DIR

for SOURCE in `find $DIR -type f -name "*.blame"`; do
#echo $SOURCE

SOURCE_REL=${SOURCE#$DIR/}
SOURCE_ORIG=${SOURCE_REL%.blame}

LINES=`cat $SOURCE | wc -l`
WORDS=`cat $SOURCE | wc -w`
CHARS=`cat $SOURCE | wc -m`

echo $SOURCE_ORIG
echo "$SOURCE_ORIG" >> $OUTPUT
echo "Lines: $LINES" >> $OUTPUT
echo "Words: $WORDS" >> $OUTPUT
echo "Chars: $CHARS" >> $OUTPUT
cat $SOURCE | ./voroh >> $OUTPUT
echo "================================================================================" >> $OUTPUT

done
